import React from 'react';
import { SignForm } from './sign';
import { SealForm } from './seal';
import { PagingSeal } from './pagingSeal';
import { ShowPagingSeal } from './showPagingSeal';
import { FORM_TYPES } from './form';

function Form(props) {
  switch (props.formData.type) {
    case FORM_TYPES.SIGN:
      return <SignForm {...props} />;
    case FORM_TYPES.SEAL:
      return <SealForm {...props} />;
    case FORM_TYPES.PAGING_SEAL:
      return props.editPagingSeal ? <ShowPagingSeal {...props} /> : <PagingSeal {...props} />;
  }
}

export { Form };
